package com.yxuan.springboot.mapper;

import com.yxuan.springboot.model.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 * @author zchao
 *    CommentMapper层
 * @date 2023-05-14 20:40:39
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {

    /**
      * @className: CommentMapper.java
      * @methodName: queryCommentNum
      * @effect: 根据资讯Id，查询每篇资讯评论的数量
      * @author: JingxuanFan
      * @date: 2023/5/18 23:39
      **/
    String queryCommentNum(@Param("information") String information) throws Exception;

    /**
     * @className: CommentMapper.java
     * @methodName: queryCommentUserLogin
     * @effect: 根据文章Id,查询所有评论
     * @author: JingxuanFan
     * @date: 2023/5/28 20:28
     * @param information 文章Id
    **/
    List<Comment> queryComment(String information) throws Exception;

}
